package com.codegeek.project.slope.domain;

import com.codegeek.common.utils.ReplaceIllegalChar;
import com.codegeek.framework.aspectj.lang.annotation.Excel;
import com.codegeek.framework.web.domain.BaseEntity;
import lombok.Data;

/**
 * nvr对象 slope_nvr
 *
 * @author codegeek
 * @date 2020-02-17
 */
@Data
public class SlopeNvr extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    private Long nvrId;

    @Excel(name = "DVR名称")
    private String nvrName;

    /**
     * ip
     */
    @Excel(name = "ip")
    private String ip;

    /**
     * 端口号
     */
    @Excel(name = "端口号")
    private String port;

    /**
     * 用户名
     */
    @Excel(name = "用户名")
    private String username;

    /**
     * 密码
     */
    @Excel(name = "密码")
    private String password;

    @Excel(name = "设备ID")
    private Long deviceId;

    private SlopeDevice device;

    public void setNvrName(String nvrName) {
        this.nvrName = new ReplaceIllegalChar().replace(nvrName);
    }

    public void setIp(String ip) {
        this.ip = new ReplaceIllegalChar().replace(ip);
    }

    public void setPort(String port) {
        this.port = new ReplaceIllegalChar().replace(port);
    }

    public void setUsername(String username) {
        this.username = new ReplaceIllegalChar().replace(username);
    }

    public void setPassword(String password) {
        this.password = new ReplaceIllegalChar().replace(password);
    }
}
